﻿using Framework.Socket;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;

namespace MangoCannon.Framework.Socket
{
    interface ISocketService
    {
        bool start(string serverAlias,int port, int buffSize = 1024, int overTime = 3000);
        bool stop(string serverAlias);
        bool sleep(string serverAlias);
        bool awaken(string serverAlias);
        bool setServerConfig(string serverAlias,ServerConfig config);
        void shutdown();
        event EventHandler listenStarted;
        event EventHandler listenStop;
        event EventHandler statusChange;
        event EventHandler clientJoin;
        event EventHandler clientRealJoin;//接收到首次心跳包的客户会发生事件
        event EventHandler clientLeave;
        event EventHandler clientKicked;
        event EventHandler clientMessage;
    }
}
